clear all
set mem 20m
set more off
cap log close

u Summary_Data, clear

************
*** Table 2
************

gen age_group=.
replace age_group=1 if age>=17 & age<=21
replace age_group=2 if age>21 & age<30
replace age_group=3 if age>=30 & age~=.
tab age_group

tab income


************
*** Table 3
************

sum age bt internet_hours legalwindow

************
*** Table 4
************

tab antivirus_source

tab office_source


************
*** Table 5
************

gen antivirus_pirated=0
replace antivirus_pirated=1 if antivirus_source==1 | antivirus_source==2
gen age_sq=age*age
logit antivirus_pirated age age_sq income internet_hours bt

gen office_pirated=0
replace office_pirated=1 if office_source==1 | office_source==2
logit office_pirated age age_sq income internet_hours bt
